'use strict';

/**
 * @param 公共路由
 */
module.exports = app => {
  const { router } = app;
  //登录
  router.post('/login','login.login');
  //用户管理
  router.get('/getAdminPageList','admin.index');
  router.post('/saveAdmin','admin.save');
  router.get('/deleteAdmin','admin.delete');
  //角色管理
  router.get('/getRolePageList', 'role.index');
  router.post('/saveRole', 'role.save');
  router.get('/deleteRole', 'role.delete');
  router.get('/getRoleList','role.getList');
  router.get('/getPermissionByRoleId','role.getPermissionByRoleId');
  router.post('/saveNewPermissionsByRoleId','role.saveNewPermissionsByRoleId');
};
